import axios from "@/utils/api.request";
import system from "@/dao/vm/system";
import Qs from "qs"

// -> 用户登录
export const checkUser = function (data) {
  return axios.request({
    url: system.checkUser,
    data: Qs.stringify(data),
    method: "POST"
  });
};

// -> 获取用户信息
export const getUserInfoAjax = (data) => {
  return axios.request({
    url: system.getUserInfoAjax,
    data: Qs.stringify(data),
    method: "POST"
  })
}

// -> 发送短信
export const sendMessage = data => {
  return axios.request({
    url: system.sendMessage,
    data: Qs.stringify(data),
    method: "POST"
  })
}

// -> 校验验证码(NEW)
export const codeValidAjax = data => {
  return axios.request({
    url: system.codeValidAjax,
    data: Qs.stringify(data),
    method: "POST"
  })
}

// -> 重置密码(NEW)
export const resetPasswordAjax = data => {
  return axios.request({
    url: system.resetPasswordAjax,
    data: Qs.stringify(data),
    method: "POST"
  })
}
